//
//  AboutMeController.m
//  CMJWeibo
//
//  Created by BH on 15/12/4.
//
//

#import "AboutMeController.h"
#import "CMJCommonArrowItem.h"
#import "CMJCommonGroup.h"
#import "SettingController.h"

@implementation AboutMeController

-(void)viewDidLoad
{
    [super viewDidLoad];
    
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"设置" style:UIBarButtonItemStylePlain target:self action:@selector(setting)];
    
    [self setupItems];
}

/**
 * 设置按钮监听事件
 */
-(void)setting
{
    SettingController *set = [[SettingController alloc] init];
    [self.navigationController pushViewController:set animated:YES];
}

/**
 *  初始化cell每组显示模型
 */
-(void)setupItems
{
    //0组
    CMJCommonArrowItem *newFriend = [CMJCommonArrowItem itemWithTitle:@"新的好友" icon:@"new_friend"];
    newFriend.badgeValue = @"5";
    
    CMJCommonArrowItem *rank = [CMJCommonArrowItem itemWithTitle:@"微博等级" icon:nil];
    rank.subttile = @"连续登陆4天";
    
    CMJCommonGroup *group0 = [self addGroup];
    group0.items = @[newFriend,rank];
    
    //1组
    CMJCommonArrowItem *album = [CMJCommonArrowItem itemWithTitle:@"我的相册" icon:@"album"];
    album.subttile = @"(100)";
    
    CMJCommonArrowItem *collect = [CMJCommonArrowItem itemWithTitle:@"我的收藏" icon:@"collect"];
    collect.subttile = @"(10)";
    collect.badgeValue = @"36";
    
    CMJCommonArrowItem *like = [CMJCommonArrowItem itemWithTitle:@"我的赞" icon:@"like"];
    like.subttile = @"(23)";
    like.badgeValue = @"10";
    
    CMJCommonGroup *group1 = [self addGroup];
    group1.items = @[album,collect,like];
    
    //2组
    CMJCommonArrowItem *vip = [CMJCommonArrowItem itemWithTitle:@"微博会员" icon:nil];
    vip.subttile = @"卡片背景、送流量";
    
    CMJCommonArrowItem *pay = [CMJCommonArrowItem itemWithTitle:@"微博支付" icon:nil];
    pay.subttile = @"积分赢iPhone6s";
    
    CMJCommonArrowItem *suport = [CMJCommonArrowItem itemWithTitle:@"微博运动" icon:nil];
    suport.subttile = @"步数、卡路里、跑步轨迹";
    
    CMJCommonGroup *group2 = [self addGroup];
    group2.items = @[vip,pay,suport];
    
    //3组
    CMJCommonArrowItem *fans = [CMJCommonArrowItem itemWithTitle:@"粉丝服务" icon:nil];
    fans.subttile = @"设置私信互动";
    
    CMJCommonGroup *group3 = [self addGroup];
    group3.items = @[fans];
    
}

@end
